using com.tc.util;
namespace com.tc.zigbee.zcl.command
{
    public class DataType
    {
        public DataType(byte id, byte l)
        {
            typeId = id;
            length = l;
        }
        byte typeId;
        byte length;
        public byte getTypeId()
        {
            return typeId;
        }
        public byte getLength()
        {
            return length;
        }
        public DataValue value(byte[] data, int offset)
        {
            byte[] v = new byte[length];
            for (int i = 0; i < length; i++)
                v[i] = data[offset + i];
            return new DataValue(typeId, v);
        }

    }
}
